//===============================================================================
// Microsoft Architecture Strategy Team
// LitwareHR - SaaS Sample Application
//===============================================================================
// Copyright  Microsoft Corporation.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===============================================================================
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
//===============================================================================


//===============================================================================
// Microsoft Architecture Strategy Team
// LitwareHR - S+S Sample Application
//===============================================================================
// Copyright  Microsoft Corporation.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===============================================================================
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
//===============================================================================

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Collections.ObjectModel;


namespace LitwareHR.PublicApp.WinUX.Search
{
    public class WindowsDesktopSearchResultItem : INotifyPropertyChanged
    {
        private string fileName;
        private string filePath;

        public WindowsDesktopSearchResultItem(DataRow row)
        {
            if (row.Table.Columns.Contains("System.FileName"))
                fileName = row["System.FileName"].ToString();

            if (row.Table.Columns.Contains("System.ItemPathDisplay"))
                filePath = row["System.ItemPathDisplay"].ToString();
        }

        public string FileName
        {
            get { return fileName; }
            set { fileName = value; NotifyChange("FileName"); }
        }

        public string FilePath
        {
            get { return filePath; }
            set { filePath = value; NotifyChange("FilePath"); }
        }


        private void NotifyChange(string propName)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(propName));
        }

        #region INotifyChanged Members
        public event PropertyChangedEventHandler PropertyChanged;
        #endregion
    }

    public class WindowsDesktopSearchResultsCollection : ObservableCollection<WindowsDesktopSearchResultItem>
    {
        public WindowsDesktopSearchResultsCollection() : base()
        {

        }
    }
}
